import { http } from "../plugin/request";

export const find = (query: string | number) =>
  http.setRequest("GET", `/api/mysqluser/find?query=${query}`);

export const add = (body: { [key: string]: any }) =>
  http.setRequest("POST", `/api/mysqluser/add`, body);

export const deleteApi = (age: number) =>
  http.setRequest("DELETE", `/api/mysqluser/delete?age=${age}`);

export const update = (editName: string, body: { [key: string]: any }) =>
  http.setRequest("PATCH", `/api/mysqluser/edit?editName=${editName}`, body);
